<?

include("Pagina2.bin.php");

$t1 =  microtime();
$p = new Pagina2();
echo $p->GetHTML();
$t2 = microtime();
echo "Tiempo de ejecución de la página: ".(($t2-$t1)*1000)."ms\n";

/*
$debug_level = 3;

include("compiler/func.php");
include("compiler/CodeWriter.php");
include("compiler/CommonParser.php");
include("compiler/ContainerParser.php");
include("compiler/pageParser.php");
include("compiler/HtmlControlParser.php");
include("compiler/InputControlParser.php");
include("compiler/RegisteredControlParser.php");
include("compiler/userControlParser.php");
include("compiler/parserFactory.php");

include("clases/control.php");
include("clases/htmlControl.php");
include("clases/inputControl.php");
include("clases/container.php");
include("clases/page.php");
*/


/*
class A
{
	var $x;
	
	function __construct()
	{
		$this->x = 16;
	}
	
	function printMore()
	{
		echo "Como recordatorio, la variable vale ".$this->x."\n";
	}
	
	
	function test()
	{
		echo "Con this sale ".$this->x."\n";
		echo "Sin this sale ".$x."\n";
		$this->printMore();
	}

}
*/

/*
$a = new A();
$a->test();
*/

/*
$arr = array("platano", "manzana", "pera", "naranja");
unset($arr[1]);
print_r($arr);
echo "Re-indexando...\n";
$arr = array_values($arr);
print_r($arr);
echo "¿dónde está la naranja? ".array_search("naranja", $arr)."\n";
*/





/*
$t1 =  microtime();
$pp = new PageParser("Pagina2.aspx");
$pp->parse();
file_put_contents("output.php", $pp->buildSource());
$t2 = microtime();
echo "Tiempo de compilación: ".(($t2-$t1)*1000)."ms\n";

$t1 =  microtime();
include("output.php");
$p = new Pagina2();
$t2 = microtime();
echo "Tiempo de inicialización de la página: ".(($t2-$t1)*1000)."ms\n";
echo "\n\n";

$t1 =  microtime();
echo $p->GetHTML();
$t2 = microtime();
echo "Tiempo de ejecución de la página: ".(($t2-$t1)*1000)."ms\n";
*/






/*
$attr_rex = "/\\b([a-zA-Z]\\w*?)\\=\"(.*?)\"[\\s\\n\\r\\f\\>]/s";
$tag = "<div id=\"miDiv\"\nstyle=\"color:#F00; background-color:blue;\"\nalt=\"some@@@ funny#!\$ charz&\"\nonclick=\"someFunc(12);\">";
preg_match_all($attr_rex, $tag, $matches);
print_r($matches);
*/



/*
$t1 = microtime();
$arr = array("some string", "some other string", 98423, 1234.23, true, false, array("string", "otrostring", 123));
$t2 = microtime();

echo "Tiempo en construir desde código: ".($t2-$t1)."\n";
print_r($arr);

echo "Serializando...\n";
$serial = serialize($arr);
echo $serial."\n";

$t1 = microtime();
$restored = unserialize($serial);
$t2 = microtime();
echo "Tiempo en deserializar: ".($t2-$t1)."\n";

print_r($restored);
*/



/*
$xml = "<sometag>
	<div id='mydiv'>asldkfsaldkf lskadf als f
		<div>dasjf oiasj fdoiasd fasd
		</div>
	</div>
</sometag>
";
$rex = "/\\<div[\\>\\n\\s\\r\\f]/";

$cnt = preg_match_all($rex, $xml, $matches);

echo "matches: $cnt\n";
foreach($matches as $match)
{
	print_r($match);
}
*/
		








?>
